Package-level declarations

Types

Link copied to clipboard

Encoding and sample rate of audio sent to a realtime transcription session.

Link copied to clipboard

Determines when buffered realtime audio is committed for transcription.

Link copied to clipboard
sealed interface RealtimeSttEvent

Event emitted by a RealtimeSttSession.

Link copied to clipboard
data class RealtimeSttOptions(val modelId: String = "scribe_v2_realtime", val audioFormat: RealtimeSttAudioFormat = RealtimeSttAudioFormat.Pcm16000, val languageCode: String? = null, val secondaryLanguages: List<String> = emptyList(), val commitStrategy: RealtimeSttCommitStrategy = RealtimeSttCommitStrategy.Manual, val includeTimestamps: Boolean = false, val includeLanguageDetection: Boolean = false, val keyterms: List<String> = emptyList(), val noVerbatim: Boolean = false, val enableLogging: Boolean = true)

Configuration applied when opening a realtime speech-to-text connection.

Link copied to clipboard

A controllable realtime speech-to-text WebSocket session.

Link copied to clipboard
interface SpeechToTextApi

Transcribes complete files and realtime audio streams.

Link copied to clipboard
sealed interface SpeechToTextAuthorization

Credentials used for batch or realtime speech-to-text operations.

Link copied to clipboard

Format hint for a batch speech-to-text upload.

Link copied to clipboard
data class SpeechToTextRequest(val audio: ByteArray, val fileName: String = "audio.mp3", val contentType: String = "audio/mpeg", val modelId: String = "scribe_v2", val languageCode: String? = null, val tagAudioEvents: Boolean = true, val numberOfSpeakers: Int? = null, val timestampsGranularity: TimestampsGranularity = TimestampsGranularity.Word, val diarize: Boolean = false, val fileFormat: SpeechToTextFileFormat = SpeechToTextFileFormat.Other, val enableLogging: Boolean = true)

Input for transcribing one complete audio or video file.

Link copied to clipboard

Supplies single-use credentials for speech-to-text operations.

Link copied to clipboard

Timestamp detail requested for a batch transcription.

Link copied to clipboard
data class Transcription(val languageCode: String?, val languageProbability: Double?, val text: String, val words: List<TranscriptionWord>)

Result of a batch speech-to-text request.

Link copied to clipboard
data class TranscriptionWord(val text: String, val startSeconds: Double?, val endSeconds: Double?, val type: String, val speakerId: String?, val logProbability: Double?, val channelIndex: Int?)

A timestamped unit in a transcription.